﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Helper;
namespace Services.BusinessRules
{
   public class ValidateRequired:BusinessObject
    {

       string Data;
       string NameEN;
       string NameVN;
       public ValidateRequired(String namevn,string nameen, string data)
       {
           this.Data = data;
           this.NameVN = namevn;
           this.NameEN = nameen;
           AddValidate(Check());
       }



        string Check()
       {
            
             if(String.IsNullOrEmpty(this.Data))
             {
                 if (ValueDefine.Lang == ValueDefine.Language.VN)
                 {
                     return NameVN + " " + ErrorCodeVN.NotEmty;
                 }
                 else
                 {
                     return NameEN + " " + ErrorCodeEN.NotEmty;
                 }
             }
             else
             {
                 return null;
             }
       }


    }
}
